/*******************************************************************************************************

Table A10: Difference-in-differences estimates including petitions sent in 1830-32; dif-
ferent specification of the outcome variable

*******************************************************************************************************/


*Set directory path
cd "C:\Users\tsa23\Documents\petitions\replication files"

clear all

*read in our main dataset
use dta/did_rep.dta

*Elminate contrituencies which are not part of case G
drop if ID == 45 //University of Cambridge
drop if ID == 191 //University of Oxford
keep if new == 1 | drummond == .

gen treatgroup = 0
replace treatgroup =  1 if new==1 

gen treatinter = treatperiod*treatgroup

collapse ln_petitions ln_petitions_without treatgroup, by(ID treatperiod treatinter)

label var treatinter "T * A" 
label var treatgroup "T"
label var treatperiod "A"
label var ln_petitions "Log all petitions"
label var ln_petitions_without "Log petitions excluding reform petitions"

reg ln_petitions_without treatinter treatgroup treatperiod, cl(ID)
outreg2 treatinter treatgroup treatperiod using results\tableA10, nocons replace addt(Constituencies, 135, Treatment, G, 1830-32 petitions, non-reform) asterisk(coef) auto(2) label ctitle(Log (petitions + 1)) keep(treatinter treatgroup treatperiod) se  symbol(**,*,+) tex(frag)

clear all

*read in our main dataset
use dta/did_rep.dta

*Elminate contrituencies which are not part of case L
drop if ID == 45 //University of Cambridge
drop if ID == 191 //University of Oxford
keep if sch_A==1 | sch_B == 1 | drummond!=.

gen treatgroup = 0
replace treatgroup =  1 if sch_A==1 

gen treatinter = treatperiod*treatgroup

collapse ln_petitions ln_petitions_without treatgroup, by(ID treatperiod treatinter)

label var treatinter "T * A" 
label var treatgroup "T"
label var treatperiod "A"
label var ln_petitions "Log all petitions"
label var ln_petitions_without "Log petitions excluding reform petitions"

reg ln_petitions_without treatinter treatgroup treatperiod, cl(ID)
outreg2 treatinter treatgroup treatperiod using results\tableA10, nocons append addt(Constituencies, 120, Treatment, L, 1830-32 petitions, non-reform) asterisk(coef) auto(2) label ctitle(Log (petitions + 1)) keep(treatinter treatgroup treatperiod) se  symbol(**,*,+) tex(frag)


clear all

*read in our main dataset
use dta/did_rep.dta

*Elminate contrituencies which are not part of case G
drop if ID == 45 //University of Cambridge
drop if ID == 191 //University of Oxford
keep if new == 1 | drummond == .

gen treatgroup = 0
replace treatgroup =  1 if new==1 

gen treatinter = treatperiod*treatgroup

collapse ln_petitions ln_petitions_without treatgroup, by(ID treatperiod treatinter)

label var treatinter "T * A" 
label var treatgroup "T"
label var treatperiod "A"
label var ln_petitions "Log all petitions"

reg ln_petitions treatinter treatgroup treatperiod, cl(ID)
outreg2 treatinter treatgroup treatperiod using results\tableA10, nocons append addt(Constituencies, 135, Treatment, G, 1830-32 petitions, all) asterisk(coef) auto(2) label ctitle(Log (petitions + 1)) keep(treatinter treatgroup treatperiod) se  symbol(**,*,+) tex(frag)

clear all

*read in our main dataset
use dta/did_rep.dta

*Elminate contrituencies which are not part of case L
drop if ID == 45 //University of Cambridge
drop if ID == 191 //University of Oxford
keep if sch_A==1 | sch_B == 1 | drummond!=.

gen treatgroup = 0
replace treatgroup =  1 if sch_A==1 

gen treatinter = treatperiod*treatgroup

collapse ln_petitions ln_petitions_without treatgroup, by(ID treatperiod treatinter)

label var treatinter "T * A" 
label var treatgroup "T"
label var treatperiod "A"
label var ln_petitions "Log all petitions"

reg ln_petitions treatinter treatgroup treatperiod, cl(ID)
outreg2 treatinter treatgroup treatperiod using results\tableA10, nocons append addt(Constituencies, 120, Treatment, L, 1830-32 petitions, all) asterisk(coef) auto(2) label ctitle(Log (petitions + 1)) keep(treatinter treatgroup treatperiod) se  symbol(**,*,+) tex(frag)



clear all

*read in our main dataset
use dta/did_rep.dta

*Elminate contrituencies which are not part of case G
drop if ID == 45 //University of Cambridge
drop if ID == 191 //University of Oxford
keep if new == 1 | drummond == .

drop if year==1830 | year==1831 | year==1832

gen treatgroup = 0
replace treatgroup =  1 if new==1 

gen treatinter = treatperiod*treatgroup

collapse petitions treatgroup, by(ID treatperiod treatinter)

label var treatinter "T * A" 
label var treatgroup "T"
label var treatperiod "A"
label var petitions "All petitions"

reg petitions treatinter treatgroup treatperiod, cl(ID)
outreg2 treatinter treatgroup treatperiod using results\tableA10, nocons append addt(Constituencies, 135, Treatment, G, 1830-32 petitions, none) asterisk(coef) auto(2) label ctitle(Petitions) keep(treatinter treatgroup treatperiod) se  symbol(**,*,+) tex(frag)

clear all

*read in our main dataset
use dta/did_rep.dta

*Elminate contrituencies which are not part of case L
drop if ID == 45 //University of Cambridge
drop if ID == 191 //University of Oxford
keep if sch_A==1 | sch_B == 1 | drummond!=.

drop if year==1830 | year==1831 | year==1832

gen treatgroup = 0
replace treatgroup =  1 if sch_A==1 

gen treatinter = treatperiod*treatgroup

collapse petitions treatgroup, by(ID treatperiod treatinter)

label var treatinter "T * A" 
label var treatgroup "T"
label var treatperiod "A"
label var petitions "All petitions"

reg petitions treatinter treatgroup treatperiod, cl(ID)
outreg2 treatinter treatgroup treatperiod using results\tableA10, nocons append addt(Constituencies, 120, Treatment, L, 1830-32 petitions, none) asterisk(coef) auto(2) label ctitle(Petitions) keep(treatinter treatgroup treatperiod) se  symbol(**,*,+) tex(frag)
